#!
docker build -f dockerfiles_aarch64/base_ubuntu/Dockerfile.zh -t harbor.x-contion.top:500/x-contion-aarch64/base_ubuntu:zh .
docker tag harbor.x-contion.top:500/x-contion-aarch64/base_ubuntu:zh swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/base_ubuntu:zh
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/base_ubuntu:zh

#! manypython
docker build -f dockerfiles_aarch64/base_python/Dockerfile.manypython -t harbor.x-contion.top:500/x-contion-aarch64/base_python:manypython .
docker tag harbor.x-contion.top:500/x-contion-aarch64/base_python:manypython swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/base_python:manypython
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/base_python:manypython


#! A2 8.2.rc2 pytorch py310
tag=A2-cann82rc2-py310-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/pytorch_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/pytorch_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag} .;
# docker run -it --rm \
#     -v /usr/local/Ascend/driver/:/usr/local/Ascend/driver \
#     -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
#     --privileged harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag}
docker tag harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/pytorch_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/pytorch_npu:${tag}

#! A3 8.2.rc2 pytorch py310
tag=A3-cann82rc2-py310-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/pytorch_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/pytorch_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag} .;
# docker run -it --rm \
#     -v /usr/local/Ascend/driver/:/usr/local/Ascend/driver \
#     -v /usr/local/bin/npu-smi:/usr/local/bin/npu-smi \
#     --privileged harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag}
docker tag harbor.x-contion.top:500/x-contion-aarch64/pytorch_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/pytorch_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/pytorch_npu:${tag}



#! Verl-A2-cann82rc2-vllm0110-mcore012-torch27
tag=verl-A2-cann82rc2-vllm0110-mcore012-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/rl_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/rl_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} .;
docker tag harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}

#! Verl-A3-cann82rc2-vllm0110-mcore012-torch27
tag=verl-A3-cann82rc2-vllm0110-mcore012-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/rl_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/rl_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} .;
docker tag harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}

#! Verl-A2-cann82rc2-vllm0100-mcore012-torch27
tag=verl-A2-cann82rc2-vllm0100-mcore012-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/rl_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/rl_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} .;
docker tag harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}

#! Verl-A3-cann82rc2-vllm0100-mcore012-torch27
tag=verl-A3-cann82rc2-vllm0100-mcore012-torch27
python auto_gen_dockercp.py --aarch64;
sed -i ':a;N;s@--mount=.*\\\n@@g;ba' dockerfiles_aarch64/rl_npu/Dockerfile.${tag} ;
docker build -f dockerfiles_aarch64/rl_npu/Dockerfile.${tag} -t harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} .;
docker tag harbor.x-contion.top:500/x-contion-aarch64/rl_npu:${tag} swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}
docker push swr.cn-north-4.myhuaweicloud.com/wlf_darkmaster/x-contion-aarch64/rl_npu:${tag}

